<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if的使用</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<div id="app">
    <div v-for="(value, index) in sites">
        <p v-if="index % 2 != 0">
            {{'索引值：' + index + ' --- 每一项：' + value}}
        </p>
    </div>
</div>

<script>
    new Vue({
        el: '#app',
        data: {
            sites: [1, 2, 3, 4, 5, 6]
        }
    })
</script>
</body>
</html>
